#ifndef ALGTESTFORM_H
#define ALGTESTFORM_H


#include <QFileInfo>
#include <QWidget>

#include <opencv2/core/mat.hpp>


namespace Ui {
class AlgTestForm;
}

class AlgTestForm : public QWidget
{
    Q_OBJECT

public:
    explicit AlgTestForm(QWidget *parent = nullptr);
    ~AlgTestForm();

    void RdConfig(int index);
    void WdConfig(int index);

    void processAreaCameraImage(const cv::Mat& dst);

    void displayImageWithRect(const cv::Mat& dst, const QRect& rect);

signals:
    void sigAlgTestPath(QFileInfoList fileList);
public slots:
    void handleAlgorithmResult(QImage result);
private slots:


    void on_comboBox_activated(int index);

    void on_Bt_open_scan_clicked();

    void on_Bt_open_area_clicked();

    void on_Bt_draw_roi_clicked();

    void on_Bt_save_roi_clicked();

    void on_Bt_retest_clicked();

private:
    Ui::AlgTestForm *ui;
    int m_roi;
    int m_nCameraIndex;
    QString m_sfilePath;

    QRect m_qRect;
    cv::Mat m_original;
};

#endif // ALGTESTFORM_H
